package org.hxyjs.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class FestivalExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public FestivalExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andFnoIsNull() {
            addCriterion("fno is null");
            return (Criteria) this;
        }

        public Criteria andFnoIsNotNull() {
            addCriterion("fno is not null");
            return (Criteria) this;
        }

        public Criteria andFnoEqualTo(String value) {
            addCriterion("fno =", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoNotEqualTo(String value) {
            addCriterion("fno <>", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoGreaterThan(String value) {
            addCriterion("fno >", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoGreaterThanOrEqualTo(String value) {
            addCriterion("fno >=", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoLessThan(String value) {
            addCriterion("fno <", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoLessThanOrEqualTo(String value) {
            addCriterion("fno <=", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoLike(String value) {
            addCriterion("fno like", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoNotLike(String value) {
            addCriterion("fno not like", value, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoIn(List<String> values) {
            addCriterion("fno in", values, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoNotIn(List<String> values) {
            addCriterion("fno not in", values, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoBetween(String value1, String value2) {
            addCriterion("fno between", value1, value2, "fno");
            return (Criteria) this;
        }

        public Criteria andFnoNotBetween(String value1, String value2) {
            addCriterion("fno not between", value1, value2, "fno");
            return (Criteria) this;
        }

        public Criteria andFnameIsNull() {
            addCriterion("fname is null");
            return (Criteria) this;
        }

        public Criteria andFnameIsNotNull() {
            addCriterion("fname is not null");
            return (Criteria) this;
        }

        public Criteria andFnameEqualTo(String value) {
            addCriterion("fname =", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameNotEqualTo(String value) {
            addCriterion("fname <>", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameGreaterThan(String value) {
            addCriterion("fname >", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameGreaterThanOrEqualTo(String value) {
            addCriterion("fname >=", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameLessThan(String value) {
            addCriterion("fname <", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameLessThanOrEqualTo(String value) {
            addCriterion("fname <=", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameLike(String value) {
            addCriterion("fname like", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameNotLike(String value) {
            addCriterion("fname not like", value, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameIn(List<String> values) {
            addCriterion("fname in", values, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameNotIn(List<String> values) {
            addCriterion("fname not in", values, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameBetween(String value1, String value2) {
            addCriterion("fname between", value1, value2, "fname");
            return (Criteria) this;
        }

        public Criteria andFnameNotBetween(String value1, String value2) {
            addCriterion("fname not between", value1, value2, "fname");
            return (Criteria) this;
        }

        public Criteria andFbegindateIsNull() {
            addCriterion("fbeginDate is null");
            return (Criteria) this;
        }

        public Criteria andFbegindateIsNotNull() {
            addCriterion("fbeginDate is not null");
            return (Criteria) this;
        }

        public Criteria andFbegindateEqualTo(Date value) {
            addCriterionForJDBCDate("fbeginDate =", value, "fbegindate");
            return (Criteria) this;
        }

        public Criteria andFbegindateNotEqualTo(Date value) {
            addCriterionForJDBCDate("fbeginDate <>", value, "fbegindate");
            return (Criteria) this;
        }

        public Criteria andFbegindateGreaterThan(Date value) {
            addCriterionForJDBCDate("fbeginDate >", value, "fbegindate");
            return (Criteria) this;
        }

        public Criteria andFbegindateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("fbeginDate >=", value, "fbegindate");
            return (Criteria) this;
        }

        public Criteria andFbegindateLessThan(Date value) {
            addCriterionForJDBCDate("fbeginDate <", value, "fbegindate");
            return (Criteria) this;
        }

        public Criteria andFbegindateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("fbeginDate <=", value, "fbegindate");
            return (Criteria) this;
        }

        public Criteria andFbegindateIn(List<Date> values) {
            addCriterionForJDBCDate("fbeginDate in", values, "fbegindate");
            return (Criteria) this;
        }

        public Criteria andFbegindateNotIn(List<Date> values) {
            addCriterionForJDBCDate("fbeginDate not in", values, "fbegindate");
            return (Criteria) this;
        }

        public Criteria andFbegindateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("fbeginDate between", value1, value2, "fbegindate");
            return (Criteria) this;
        }

        public Criteria andFbegindateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("fbeginDate not between", value1, value2, "fbegindate");
            return (Criteria) this;
        }

        public Criteria andFdescribeIsNull() {
            addCriterion("fDescribe is null");
            return (Criteria) this;
        }

        public Criteria andFdescribeIsNotNull() {
            addCriterion("fDescribe is not null");
            return (Criteria) this;
        }

        public Criteria andFdescribeEqualTo(String value) {
            addCriterion("fDescribe =", value, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFdescribeNotEqualTo(String value) {
            addCriterion("fDescribe <>", value, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFdescribeGreaterThan(String value) {
            addCriterion("fDescribe >", value, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFdescribeGreaterThanOrEqualTo(String value) {
            addCriterion("fDescribe >=", value, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFdescribeLessThan(String value) {
            addCriterion("fDescribe <", value, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFdescribeLessThanOrEqualTo(String value) {
            addCriterion("fDescribe <=", value, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFdescribeLike(String value) {
            addCriterion("fDescribe like", value, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFdescribeNotLike(String value) {
            addCriterion("fDescribe not like", value, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFdescribeIn(List<String> values) {
            addCriterion("fDescribe in", values, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFdescribeNotIn(List<String> values) {
            addCriterion("fDescribe not in", values, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFdescribeBetween(String value1, String value2) {
            addCriterion("fDescribe between", value1, value2, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFdescribeNotBetween(String value1, String value2) {
            addCriterion("fDescribe not between", value1, value2, "fdescribe");
            return (Criteria) this;
        }

        public Criteria andFimgIsNull() {
            addCriterion("fimg is null");
            return (Criteria) this;
        }

        public Criteria andFimgIsNotNull() {
            addCriterion("fimg is not null");
            return (Criteria) this;
        }

        public Criteria andFimgEqualTo(String value) {
            addCriterion("fimg =", value, "fimg");
            return (Criteria) this;
        }

        public Criteria andFimgNotEqualTo(String value) {
            addCriterion("fimg <>", value, "fimg");
            return (Criteria) this;
        }

        public Criteria andFimgGreaterThan(String value) {
            addCriterion("fimg >", value, "fimg");
            return (Criteria) this;
        }

        public Criteria andFimgGreaterThanOrEqualTo(String value) {
            addCriterion("fimg >=", value, "fimg");
            return (Criteria) this;
        }

        public Criteria andFimgLessThan(String value) {
            addCriterion("fimg <", value, "fimg");
            return (Criteria) this;
        }

        public Criteria andFimgLessThanOrEqualTo(String value) {
            addCriterion("fimg <=", value, "fimg");
            return (Criteria) this;
        }

        public Criteria andFimgLike(String value) {
            addCriterion("fimg like", value, "fimg");
            return (Criteria) this;
        }

        public Criteria andFimgNotLike(String value) {
            addCriterion("fimg not like", value, "fimg");
            return (Criteria) this;
        }

        public Criteria andFimgIn(List<String> values) {
            addCriterion("fimg in", values, "fimg");
            return (Criteria) this;
        }

        public Criteria andFimgNotIn(List<String> values) {
            addCriterion("fimg not in", values, "fimg");
            return (Criteria) this;
        }

        public Criteria andFimgBetween(String value1, String value2) {
            addCriterion("fimg between", value1, value2, "fimg");
            return (Criteria) this;
        }

        public Criteria andFimgNotBetween(String value1, String value2) {
            addCriterion("fimg not between", value1, value2, "fimg");
            return (Criteria) this;
        }

        public Criteria andFenddateIsNull() {
            addCriterion("fendDate is null");
            return (Criteria) this;
        }

        public Criteria andFenddateIsNotNull() {
            addCriterion("fendDate is not null");
            return (Criteria) this;
        }

        public Criteria andFenddateEqualTo(Date value) {
            addCriterionForJDBCDate("fendDate =", value, "fenddate");
            return (Criteria) this;
        }

        public Criteria andFenddateNotEqualTo(Date value) {
            addCriterionForJDBCDate("fendDate <>", value, "fenddate");
            return (Criteria) this;
        }

        public Criteria andFenddateGreaterThan(Date value) {
            addCriterionForJDBCDate("fendDate >", value, "fenddate");
            return (Criteria) this;
        }

        public Criteria andFenddateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("fendDate >=", value, "fenddate");
            return (Criteria) this;
        }

        public Criteria andFenddateLessThan(Date value) {
            addCriterionForJDBCDate("fendDate <", value, "fenddate");
            return (Criteria) this;
        }

        public Criteria andFenddateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("fendDate <=", value, "fenddate");
            return (Criteria) this;
        }

        public Criteria andFenddateIn(List<Date> values) {
            addCriterionForJDBCDate("fendDate in", values, "fenddate");
            return (Criteria) this;
        }

        public Criteria andFenddateNotIn(List<Date> values) {
            addCriterionForJDBCDate("fendDate not in", values, "fenddate");
            return (Criteria) this;
        }

        public Criteria andFenddateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("fendDate between", value1, value2, "fenddate");
            return (Criteria) this;
        }

        public Criteria andFenddateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("fendDate not between", value1, value2, "fenddate");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}